<template>
  <div class="Showcase1">
    <div class="shadow-box">
      <img class="shadow-left" :src="publicUrls + 'free/style5/Showcase3dy1.webp'" alt="" />
      <div
        class="shadow-center"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style5/Showcase3dy2.webp'})`,
        }"
      ></div>
      <img class="shadow-right" :src="publicUrls + 'free/style5/Showcase3dy3.webp'" alt="" />
    </div>
    <div class="Showcase1-top">
      <img
        class="Showcase1-top-left"
        :src="publicUrls + 'free/style5/Showcase3bg1.webp'"
        alt=""
      />
      <div
        class="Showcase1-top-center"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style5/Showcase3bg2.webp'})`,
        }"
      ></div>
      <img
        class="Showcase1-top-right"
        :src="publicUrls + 'free/style5/Showcase3bg3.webp'"
        alt=""
      />
    </div>
    <div class="Showcase1-center">
      <div
        class="Showcase1-center-left"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style5/Showcase3bg4.webp'})`,
        }"
      ></div>
      <div class="Showcase1-center-center"></div>
      <div
        class="Showcase1-center-right"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style5/Showcase3bg5.webp'})`,
        }"
      ></div>
    </div>
    <div class="Showcase1-bottom">
      <div
        :style="{
          left: `${ShowcaseItemTransform(item.x ? item.x : getParentX(index), item.width, 1.055)}rem`,
          backgroundImage: `url(${publicUrls + 'free/style5/Showcase3NameBg.webp'})`,
        }"
        class="ex-item"
        v-for="(item, index) in props.list"
        :key="index"
      >
        <p class="name-box">
          {{ item.name }}
        </p>
      </div>
      <img
        class="Showcase1-bottom-left"
        :src="publicUrls + 'free/style5/Showcase3bg6.webp'"
        alt=""
      />
      <div
        class="Showcase1-bottom-center"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style5/Showcase3bg7.webp'})`,
        }"
      >
        <img
          class="Showcase1-bottom-center-1"
          :src="publicUrls + 'free/style5/Showcase3bg9.webp'"
          alt=""
        />
        <img
          class="Showcase1-bottom-center-2"
          :src="publicUrls + 'free/style5/Showcase3bg10.webp'"
          alt=""
        />
      </div>
      <img
        class="Showcase1-bottom-right"
        :src="publicUrls + 'free/style5/Showcase3bg8.webp'"
        alt=""
      />
    </div>
    <!-- Showcase1Topleft -->
  </div>
</template>    

<script lang="ts">
export default defineComponent({
  name: 'style5',
});
</script>
  
<script setup lang="ts">
import { ShowcaseItemTransform } from '@/utils/setmaterialStyle';
import { publicUrls } from '@/utils/minxin';
import { defineComponent } from 'vue';
const props = defineProps({
  list: {
    type: Object,
  },
});
const getParentX = (indexs: number) => {
  let x = 0;
  for (let index = 0; index < indexs; index++) {
    // const element = array[index];
    x = x + props.list[index].width;
  }

  return x + 0.416;
};
</script>  

<style scoped lang="less">
.Showcase1 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 400px; 
  min-width: 187px;
  // -webkit-box-reflect: below 0% linear-gradient(transparent, rgba(0, 0, 0, 0.2));
}
.Showcase1-top {
  display: flex;
  width: 100%;
  height: 5px;
}
.Showcase1-top-left {
  width: 36px;
  height: 5px;
}
.Showcase1-top-center {
  flex: 1;
  height: 5px;
  background-repeat: repeat;
  background-size: auto 100%;
}
.Showcase1-top-right {
  width: 51px;
  height: 5px;
}
.Showcase1-center {
  position: relative;
  display: flex;
  width: 100%;  
  height: calc(100% - 302px);
}
.ex-item { 
  display: flex; 
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 54px;
  width: 152px; 
  height: 33px;
  z-index: 30;
  background: rgba(216, 224, 220, 1);
  border: 1px solid rgba(126, 164, 154, 1);
}
.name-box {
  width: 145px;
  height: 24px;
  font-family: SourceHanSerifCN-Bold;
  font-size: 16px;
  color: rgba(63, 95, 92, 1);
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.Showcase1-center-left {
  width: 36px;
  height: 100%;
  background-repeat: repeat;
  background-size: 100% auto;
}
.Showcase1-center-center {
  flex: 1;
  height: 100%;
  background-repeat: repeat;
  background-size: 100% auto;
}
.Showcase1-center-right {
  width: 51px;
  height: 100%;
  background-repeat: repeat;
  background-size: 100% auto;
}
.Showcase1-bottom {
  position: relative;
  display: flex;
  width: 100%;
  height: 297px;
}
.Showcase1-bottom-left {
  width: 36px;
  height: 105px;
}
.Showcase1-bottom-center {
  position: relative;
  flex: 1;
  height: 297px;
  background-repeat: repeat;
  background-size: auto 100%;
  .Showcase1-bottom-center-1 {
    position: absolute;
    top: 110px;
    left: 0;
    width: 45px;
    height: 83px;
  }
  .Showcase1-bottom-center-2 {
    position: absolute;
    bottom: 4px;
    right: 0;
    width: 45px;
    height: 83px;
  }
  // .Showcase1-bottom-center-center {
  //   position: absolute;
  //   top: -52px;
  //   left: calc(50% - 16px);
  //   width: 32px;
  //   height: 102px;

  //   z-index: 12;
  // }
}
.Showcase1-bottom-right {
  width: 51px;
  height: 297px;
}
.shadow-box {
  display: flex;
  align-items: flex-end;
  position: absolute; 
  bottom: -420px;
  left: 0; 
  z-index: -1; 
  width: 100%;
  height: 435px;
  opacity: .15;
}
.shadow-left {
  width: 36px;  
  height: 228px; 
}
.shadow-center {
  flex: 1;
  height: 420px;
  background-repeat: repeat;
  background-size: 100% 100%;
}
.shadow-right {
  width: 51px;
  height: 435px;
}
</style>